﻿@model IEnumerable<SpyApp.Models.Message>
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="page-header">
    <h3>@ViewBag.Title</h3>
</div>



<nav>
    <ul class="pagination">
        <li><a href="#" class="disable">&lt;</a></li>
        <li><a href="#">1</a></li>
        <li>...</li>
        <li><a href="#">19</a></li>
        <li><a href="#">20</a></li>
        <li><a href="#" class="select">21</a></li>
        <li><a href="#">22</a></li>
        <li><a href="#">23</a></li>
        <li>...</li>
        <li><a href="#">50</a></li>
        <li><a href="#">&gt;</a></li>
    </ul>
</nav>

<table>
    <thead>
        <tr>
            <td colspan="4">
                
            </td>
        </tr>
        <tr>
            <th>Type</th>
            <th>
                @Html.ActionLink("Number", "Index", "Common", new {sortOrder = ViewBag.NumberSortParm })
            </th>
            <th>
                @Html.ActionLink("Context", "Index", "Common", new {sortOrder = ViewBag.ContextParm})
            </th>
            <th>At</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>@item.Type</td>
                <td>@item.NumberSendReceive</td>
                <td>@item.UserMessage</td>
                <td>@item.SendDateTime</td>
            </tr>
        }
    </tbody>
    <tfoot>
        @*<tr>
            <td colspan="4">
               @for(var i=0;i<info.PageCount;i++)
                  {
                     if(i==info.CurrentPageIndex)
                     {
                        <span>@(i+1)</span>
                     }
                     else
                     {
                        <a href="#" data-pageindex="@i"
                           class="pager">@(i + 1)</a>
                     }
               }
            </td>
         </tr>*@

    </tfoot>
</table>